package cn.t.modules.scheduler.rest.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.Set;

/**
 * @author 陶敏麒
 * @date 2024/3/5 15:00
 */
@Data
public class AddDelayMailTaskReq {
    @NotEmpty(message = "任务名称不能为空")
    private String taskName;
    @NotNull(message = "执行时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime execTime;
    // 提醒的内容
    @NotEmpty(message = "提醒内容不能为空")
    private String content;
    @NotNull(message = "收件人列表不能为空")
    private Set<String> toUsers;
}
